package com.py.credit.dao;

import java.util.List;
import java.util.Map;

import org.apache.ibatis.annotations.Param;

import com.py.credit.entity.Classify;
import com.py.credit.entity.TreeIndexc;
import com.py.framework.core.common.Page;

public interface ClassifyDao {

	/**
	 * 分页查询分类列表信息
	 * 
	 * @param params
	 * @return
	 */
	List<Classify> queryCategoryForPage(@Param(value = "name") String name, @Param(value = "page") Page page,
			@Param(value = "mainType") String mainType);

	/**
	 * 添加指标分类表
	 */
	void addIndexCategory(@Param(value = "indexList") List<Map<String, Object>> indexList);

	/**
	 * 添加分类
	 */
	void addCategory(@Param(value = "categoryList") List<Map<String, Object>> categoryList);

	/**
	 * 添加顶级分类
	 */
	void addTopCategory(@Param(value = "classify") Classify classify);

	/**
	 * 查询所有一级分类信息
	 */
	List<Classify> getTopCategory(@Param(value = "mainType") String mainType);

	/**
	 * 删除一级分类
	 */
	void deleteCategoryById(@Param(value = "list") List<String> id);

	/**
	 * 删除指标分类表
	 */
	void deleteIndexCategoryByTopId(@Param(value = "topId") String topId);

	/**
	 * 更新分类
	 */
	void updateCategory(@Param(value = "classify") Classify classify);

	/**
	 * 获取分类指标树
	 */
	List<TreeIndexc> getTreeByTopId(@Param(value = "topId") String topId);

	/**
	 * 根据id查询分类信息
	 */
	Classify getCategoryById(@Param(value = "id") String id);

	/**
	 * 根据分类id查询分页模型关联表
	 */
	int findInCaModel(@Param(value = "id") String id);

	int selectCountIc(@Param(value = "topid") String topid);

	/**
	 * 根据top_parent_id删除分类信息
	 * 
	 * @param topid
	 */
	void deleteCategoryByTopId(@Param(value = "topId") String topId);

	void deleteXypjIndexCategoryByTopId(@Param(value = "list") List<String> id);

	void addIndexCategoryByEntity(@Param(value = "indexList") List<TreeIndexc> indexList);

	void addCategoryByEntity(@Param(value = "categoryList") List<TreeIndexc> categoryList);

	Integer selectCateModelByid(@Param(value = "id") String id);
	
	Integer selectCateModelByIdDel(@Param(value = "id") String id);
}
